<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="${path}/css/editTable.css">
    <script type="text/javascript">
    	function check(){
    		var name = document.getElementById("name").value;
    		if('' == name){
    			alert("请输入渠道名称");
    			return false;
    		}
    		var detail = document.getElementById("detail").value;
    		if('' == detail){
    			alert("请输入渠道详情");
    			return false;
    		}
    		var user_id = document.getElementById("user_id").value;
     		if("" == user_id || "0" == user_id){
     			alert("请选择渠道用户名");
     			return false;
     		}
    	}
    </script>
  </head>
  <body>
    <div>
    	<form id="editPartnerUpperForm" name="editPartnerUpperForm" method="post" action="${path }/partnerUpper/updatePartnerUpper.action" onsubmit="return check();">
    		<p>填写渠道信息</p>
    		<c:choose>
    			<c:when test="${partnerUpperVo.id == null }">
    				<input type="hidden" name="partnerUpperVo.id" value="0" />
    			</c:when>
    			<c:otherwise>
    				<input type="hidden" name="partnerUpperVo.id" value="${partnerUpperVo.id }" />
    			</c:otherwise>
    		</c:choose>
    		<table>
	    		<tr>
	    			<td>上游名称</td>
	    			<td><input type="text" id="name" name="partnerUpperVo.name" value="${partnerUpperVo.name }" />
	    			<span style="color: red;size: 2px;">&nbsp;*必填项</span></td>
	    		</tr>
	    		<tr>
	    			<td>上游详情</td>
	    			<td><input type="text" id="detail" name="partnerUpperVo.detail" value="${partnerUpperVo.detail }" />
	    			<span style="color: red;size: 2px;">&nbsp;*必填项</span></td>
	    		</tr>
	    		<tr>
	    			<td>上游绑定IP</td>
	    			<td>
	    				<input type="text" id="bindip" name="partnerUpperVo.bindip" value="${partnerUpperVo.bindip }" />
	    				<span style="color: red;size: 2px;">&nbsp;*必填项&nbsp;&nbsp;多个IP用&nbsp;','&nbsp;隔开, '*'&nbsp;代表允许所有IP接入</span>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td colspan="2"><input type="submit" name="submit" value="确认" /></td>
	    		</tr>
	    	</table>
		</form>
    </div>
  </body>
</html>